My Profile_


MCP Pre-Authorization

NEW!   We now have our Interactive tool for this section.

Verifies and locks funds on the customer’s credit card. The funds are locked for a specified amount of time based on the card issuer.To retrieve the funds that have been locked by a Pre-Authorization transaction so that they may be settled in the merchant’s account, a Pre-Authorization Completion transaction must be performed. A Pre-Authorization transaction may only be "completed" once.

This transaction request is the multi-currency pricing (MCP) enabled version of the equivalent financial transaction.

MCP Pre-Authorization transaction object definition

MCPPreAuth mcpPreauth = new MCPPreAuth();

HttpsPostRequest object for MCP Pre-Authorization transaction

HttpsPostRequest mpgReq = new HttpsPostRequest();

mpgReq.setTransaction(mcpPreauth);

Canada Code Sample

package Canada;

import JavaAPI.*;

public class TestCanadaMCPPreauth
{
	public static void main(String[] args)
	{
		String store_id = "store5";
		String api_token = "yesguy";
		java.util.Date createDate = new java.util.Date(); 
		String order_id = "Test"+createDate.getTime();
		String amount = "5.00";
		String pan = "4242424242424242";
		String expdate = "1902";
		String crypt = "7";
		String processing_country_code = "CA";
		boolean status_check = false;

		MCPPreAuth mcpPreauth = new MCPPreAuth();
		mcpPreauth.setOrderId(order_id);
		mcpPreauth.setAmount(amount);
		mcpPreauth.setPan(pan);
		mcpPreauth.setExpdate(expdate);
		mcpPreauth.setCryptType(crypt);
		//mcpPreauth.setWalletIndicator(""); //Refer documentation for possible values

		//optional - Credential on File details
		CofInfo cof = new CofInfo();
		cof.setPaymentIndicator("U");
		cof.setPaymentInformation("2");
		cof.setIssuerId("139X3130ASCXAS9"); 
		
		//mcpPreauth.setCofInfo(cof);
		
		//MCP Fields
		mcpPreauth.setMCPVersion("1.0");
		mcpPreauth.setCardholderAmount("500");
		mcpPreauth.setCardholderCurrencyCode("840");
		mcpPreauth.setMCPRateToken("P1538681661706745");
		
		HttpsPostRequest mpgReq = new HttpsPostRequest();
		mpgReq.setProcCountryCode(processing_country_code);
		mpgReq.setTestMode(true); //false or comment out this line for production transactions
		mpgReq.setStoreId(store_id);
		mpgReq.setApiToken(api_token);
		mpgReq.setTransaction(mcpPreauth);
		mpgReq.setStatusCheck(status_check);
		mpgReq.send();

		try
		{
			Receipt receipt = mpgReq.getReceipt();

			System.out.println("CardType = " + receipt.getCardType());
			System.out.println("TransAmount = " + receipt.getTransAmount());
			System.out.println("TxnNumber = " + receipt.getTxnNumber());
			System.out.println("ReceiptId = " + receipt.getReceiptId());
			System.out.println("TransType = " + receipt.getTransType());
			System.out.println("ReferenceNum = " + receipt.getReferenceNum());
			System.out.println("ResponseCode = " + receipt.getResponseCode());
			System.out.println("ISO = " + receipt.getISO());
			System.out.println("BankTotals = " + receipt.getBankTotals());
			System.out.println("Message = " + receipt.getMessage());
			System.out.println("AuthCode = " + receipt.getAuthCode());
			System.out.println("Complete = " + receipt.getComplete());
			System.out.println("TransDate = " + receipt.getTransDate());
			System.out.println("TransTime = " + receipt.getTransTime());
			System.out.println("Ticket = " + receipt.getTicket());
			System.out.println("TimedOut = " + receipt.getTimedOut());
			System.out.println("IsVisaDebit = " + receipt.getIsVisaDebit());
			//System.out.println("StatusCode = " + receipt.getStatusCode());
			//System.out.println("StatusMessage = " + receipt.getStatusMessage());
			System.out.println("IssuerId = " + receipt.getIssuerId());
			
			System.out.println("MerchantSettlementAmount = " + receipt.getMerchantSettlementAmount());
			System.out.println("CardholderAmount = " + receipt.getCardholderAmount());
			System.out.println("CardholderCurrencyCode = " + receipt.getCardholderCurrencyCode());
			System.out.println("MCPRate = " + receipt.getMCPRate());
			System.out.println("MCPErrorStatusCode = " + receipt.getMCPErrorStatusCode());
			System.out.println("MCPErrorMessage = " + receipt.getMCPErrorMessage());
			System.out.println("HostId = " + receipt.getHostId());		
		}
		catch (Exception e)
		{
			e.printStackTrace();
		}
	}
}
                

Core connection object fields (all API transactions)

Variable Name Type and Limits Set Method Description
store ID

String

N/A

mpgReq.setStoreId(store_id); Unique identifier provided by Moneris upon merchant account set up.
API token

String

N/A

mpgReq.setApiToken(api_token);

Unique alphanumeric string assigned upon merchant account activation

To find your API token, refer to your test or production store’s Admin settings in the Merchant Resource Center, at the following URLs:

MCP Pre-Authorization transaction request fields – Required

Variable Name Type and Limits Set Method Description
order ID

String

50-character alphanumeric a-Z A-Z 0-9 _ - : . @ spaces

mcpPreauth.setOrderId(order_id); Merchant-defined transaction identifier that must be unique for every Purchase, Pre-Authorization and Independent Refund transaction. No two transactions of these types may have the same order ID.

For Refund, Completion and Purchase Correction transactions, the order ID must be the same as that of the original transaction.

The last 10 characters of the order ID are displayed in the “Invoice Number” field on the Merchant Direct Reports. However only letters, numbers and spaces are sent to Merchant Direct.

A minimum of 3 and a maximum of 10 valid characters are sent to Merchant Direct. Only the last characters beginning after any invalid characters are sent. For example, if the order ID is 1234-567890, only 567890 is sent to Merchant Direct.

If the order ID has fewer than 3 characters, it may display a blank or 0000000000 in the Invoice Number field.
credit card number

String

max 20-character alphanumeric

mcpPreauth.setPan(pan); Most credit card numbers today are 16 digits, but some 13-digit numbers are still accepted by some issuers. This field has been intentionally expanded to 20 digits in consideration for future expansion and potential support of private label card ranges.
expiry date

String

4-character alphanumeric YYMM

mcpPreauth.setExpDate(expiry_date); Note: This is the reverse of the date displayed on the physical card, which is MMYY.
electronic commerce indicator

String

1-character alphanumeric

mcpPreauth.setCryptType(crypt);

Describes the category of e-commerce transaction being processed. Allowable values are:


  • 1 - Mail Order / Telephone Order—Single
  • 2 - Mail Order / Telephone Order—Recurring
  • 3 - Mail Order / Telephone Order—Instalment
  • 4 - Mail Order / Telephone Order—Unknown classification
  • 5 - Authenticated e-commerce transaction (VBV)
  • 6 - Non-authenticated e-commerce transaction (VBV)
  • 7 - SSL-enabled merchant

In Credential on File transactions where the request field e-commerce indicator is also being sent: the allowable values for e-commerce indicator are dependent on the value sent for payment indicator, as follows:


if payment indicator = R, then allowable values for e-commerce indicator: 2, 5 or 6
if payment indicator = C, then allowable values for e-commerce indicator: 1, 5, 6 or 7
if payment indicator = U, then allowable values for e-commerce indicator: 1 or 7
if payment indicator = Z, then allowable values for e-commerce indicator: 1, 5, 6 or 7

MCP-specific request fields – Required

Variable Name Type and Limits Set Method Description
MCP version number

String

current version is 1.0

mcpPreauth.setMCPVersion("MCP_VERSION_NUM"); Release version number for MCP
cardholder amount

String

12-character numeric

smallest discrete unit of foreign currency

mcpPreauth.setCardholderAmount("CARDHOLDER_AMOUNT"); Amount, in units of foreign currency, the cardholder will be charged on the transaction
cardholder currency code

String

3-character numeric

mcpPreauth.setCardholderCurrencyCode("CARDHOLDER_CURRENCY_CODE"); ISO code representing the foreign currency of the cardholder

MCP Pre-Authorization transaction request fields – Optional

Variable Name Type and Limits Set Method Description
Dynamic descriptor String 20-character alphanumeric mcpPreauth.setDynamicDescriptor(dynamic_descriptor); Merchant defined description sent on a per-transaction basis that will appear on the credit card statement. Dependent on the card Issuer, the statement will typically show the dynamic descriptor appended to the merchant's existing business name separated by the "/" character. Please note that the combined length of the merchant's business name, forward slash "/" character, and the dynamic descriptor may not exceed 22 characters.
-Example-
Existing Business Name: ABC Painting
Dynamic Descriptor: Booking 12345
Cardholder Statement Displays: ABC Painting/Booking 1

For Pre-Authorization transactions: the value in the dynamic descriptor field will only be carried over to a Pre-Authorization Completion when executing the latter via the Merchant Resource Center; otherwise, the value for dynamic descriptor must be sent again in the Pre-Authorization Completion.
customer ID

String

30-character alphanumeric

mcpPreauth.setCustId(cust_id);

This can be used for policy number, membership number, student ID, invoice number and so on.

This field is searchable from the Moneris Merchant Resource Centre

wallet indicator

String

3-character alphanumeric

mcpPreauth.setWalletIndicator(wallet_indicator); Available to Canada integrations only. This field is applicable to Visa Checkout and MasterCard MasterPass transactions whereby the merchant has integrated directly to the Visa/MC wallet to retrieve the card data and is now submitting it for processing. This is a mandatory field for these Visa Checkout and MasterCard MasterPass transactions.
Field is a case sensitive. Possible value:
  • APP = Apple Pay In-app
  • APW = Apple Pay On the Web
  • ANP = Android Pay Wallet
  • MMP = MasterCard MasterPass
  • VCO = Visa Checkout
Credential on File Info cof

NOTE: This is a nested object within the transaction, and required when storing or using the customer's stored credentials. For information about fields in the Credential on FIle Info object, see Credential on File Info Object and Variables.

Object

N/A

mcpPreauth.setCofInfo(cof); If you are doing a vault transaction (using a permanent token) the COF Info object is mandatory.
For Definitions of Request Fields of Credential on File please refer back to Purchase / Preauth with Credential on File section.
AVS Information

Object

N/A

mcpPreauth.setAvsInfo(avsCheck); Contains fields applying to the Address Verification Service (AVS) e-fraud tool
CVD Information

Object

N/A

mcpPreauth.setCvdInfo(cvdCheck); Contains fields related to the Card Validation Digits e-fraud tool

MCP-specific request fields – Optional

Variable Name Type and Limits Set Method Description
MCP rate token

String

N/A

mcpPreauth.setMCPRateToken("MCP_RATE_TOKEN"); Token representing a temporarily locked-in foreign exchange rate, obtained in the response of the MCP Get Rate transaction and used in subsequent MCP financial transaction requests in order to redeem that rate

MCP Pre-Authorization with Vault

NEW!   We now have our Interactive tool for this section.

This transaction uses the data key to identify a previously registered credit card profile in Vault. The details saved within the profile are then submitted to perform a Pre-Authorization transaction.

The data key may be a temporary one generated used Hosted Tokenization, or may be a permanent one from the Vault.

This transaction request is the multi-currency pricing (MCP) enabled version of the equivalent financial transaction.

MCP Pre-Authorization with Vault transaction object definition

MCPResPreauthCC mcpResPreauthCC = new MCPResPreauthCC();

HttpsPostRequest object for MCP Purchase with Vault transaction

HttpsPostRequest mpgReq = new HttpsPostRequest();

mpgReq.setTransaction(mcpResPreauthCC);

Canada Code Sample

package Canada;

import JavaAPI.*;

public class TestCanadaMCPResPreauthCC
{
	public static void main(String[] args)
	{
		java.util.Date createDate = new java.util.Date(); 
		String order_id = "Test"+createDate.getTime();
		String store_id = "store5";
		String api_token = "yesguy";
		String data_key = "rS7DbroQHJmJxdBfXFXiauQc4";
		String amount = "1.00";
		String cust_id = "customer1"; //if sent will be submitted, otherwise cust_id from profile will be used
		String crypt_type = "1";
		String dynamic_descriptor = "my descriptor";
		String processing_country_code = "CA";
		String expdate = "1712"; //For Temp Token
		boolean status_check = false;

		MCPResPreauthCC mcpResPreauthCC = new MCPResPreauthCC();
		mcpResPreauthCC.setDataKey(data_key);
		mcpResPreauthCC.setOrderId(order_id);
		mcpResPreauthCC.setCustId(cust_id);
		mcpResPreauthCC.setAmount(amount);
		mcpResPreauthCC.setCryptType(crypt_type);
		mcpResPreauthCC.setDynamicDescriptor(dynamic_descriptor);
		//mcpResPreauthCC.setExpDate(expdate);  //Temp Tokens only
		
		//MCP Fields
		mcpResPreauthCC.setMCPVersion("1.0");
		mcpResPreauthCC.setCardholderAmount("500");
		mcpResPreauthCC.setCardholderCurrencyCode("840");
		mcpResPreauthCC.setMCPRateToken("P1538681661706745");
		
		//Mandatory - Credential on File details
		CofInfo cof = new CofInfo();
		cof.setPaymentIndicator("U");
		cof.setPaymentInformation("2");
		cof.setIssuerId("139X3130ASCXAS9");
		
		mcpResPreauthCC.setCofInfo(cof);

		HttpsPostRequest mpgReq = new HttpsPostRequest();
		mpgReq.setProcCountryCode(processing_country_code);
		mpgReq.setTestMode(true); //false or comment out this line for production transactions
		mpgReq.setStoreId(store_id);
		mpgReq.setApiToken(api_token);
		mpgReq.setTransaction(mcpResPreauthCC);
		mpgReq.setStatusCheck(status_check);
		mpgReq.send();

		try
		{
			Receipt receipt = mpgReq.getReceipt();

			System.out.println("DataKey = " + receipt.getDataKey());
			System.out.println("ReceiptId = " + receipt.getReceiptId());
			System.out.println("ReferenceNum = " + receipt.getReferenceNum());
			System.out.println("ResponseCode = " + receipt.getResponseCode());
			System.out.println("AuthCode = " + receipt.getAuthCode());
			System.out.println("Message = " + receipt.getMessage());
			System.out.println("TransDate = " + receipt.getTransDate());
			System.out.println("TransTime = " + receipt.getTransTime());
			System.out.println("TransType = " + receipt.getTransType());
			System.out.println("Complete = " + receipt.getComplete());
			System.out.println("TransAmount = " + receipt.getTransAmount());
			System.out.println("CardType = " + receipt.getCardType());
			System.out.println("TxnNumber = " + receipt.getTxnNumber());
			System.out.println("TimedOut = " + receipt.getTimedOut());
			System.out.println("ResSuccess = " + receipt.getResSuccess());
			System.out.println("PaymentType = " + receipt.getPaymentType());
			System.out.println("IsVisaDebit = " + receipt.getIsVisaDebit());
			System.out.println("IsCorporate = " + receipt.getCorporateCard());
			System.out.println("Cust ID = " + receipt.getResCustId());
			System.out.println("Phone = " + receipt.getResPhone());
			System.out.println("Email = " + receipt.getResEmail());
			System.out.println("Note = " + receipt.getResNote());
			System.out.println("Masked Pan = " + receipt.getResMaskedPan());
			System.out.println("Exp Date = " + receipt.getResExpdate());
			System.out.println("Crypt Type = " + receipt.getResCryptType());
			System.out.println("Avs Street Number = " + receipt.getResAvsStreetNumber());
			System.out.println("Avs Street Name = " + receipt.getResAvsStreetName());
			System.out.println("Avs Zipcode = " + receipt.getResAvsZipcode());
			System.out.println("IssuerId = " + receipt.getIssuerId());
			
			System.out.println("MerchantSettlementAmount = " + receipt.getMerchantSettlementAmount());
			System.out.println("CardholderAmount = " + receipt.getCardholderAmount());
			System.out.println("CardholderCurrencyCode = " + receipt.getCardholderCurrencyCode());
			System.out.println("MCPRate = " + receipt.getMCPRate());
			System.out.println("MCPErrorStatusCode = " + receipt.getMCPErrorStatusCode());
			System.out.println("MCPErrorMessage = " + receipt.getMCPErrorMessage());
			System.out.println("HostId = " + receipt.getHostId());
		}
		catch (Exception e)
		{
			e.printStackTrace();
		}
	}
}
                

Core connection object fields (all API transactions)

Variable Name Type and Limits Set Method Description
store ID

String

N/A

mpgReq.setStoreId(store_id); Unique identifier provided by Moneris upon merchant account set up.
API token

String

N/A

mpgReq.setApiToken(api_token);

Unique alphanumeric string assigned upon merchant account activation

To find your API token, refer to your test or production store’s Admin settings in the Merchant Resource Center, at the following URLs:

MCP Pre-Authorization with Vault transaction request fields – Required

Variable Name Type and Limits Set Method Description
data key

String

25-character alphanumeric

mcpResPreauthCC.setData(data_key);

Profile identifier that all future financial Vault transactions (that is, they occur after the profile was registered by a ResAddCC or ResTokenizeCC transaction) will use to associate with the saved information.

The data key is generated by Moneris, and is returned to the merchant (via the Receipt object) when the profile is first registered.

order ID

String

50-character alphanumeric a-Z A-Z 0-9 _ - : . @ spaces

mcpResPreauthCC.setOrderId(order_id); Merchant-defined transaction identifier that must be unique for every Purchase, Pre-Authorization and Independent Refund transaction. No two transactions of these types may have the same order ID.

For Refund, Completion and Purchase Correction transactions, the order ID must be the same as that of the original transaction.

The last 10 characters of the order ID are displayed in the “Invoice Number” field on the Merchant Direct Reports. However only letters, numbers and spaces are sent to Merchant Direct.

A minimum of 3 and a maximum of 10 valid characters are sent to Merchant Direct. Only the last characters beginning after any invalid characters are sent. For example, if the order ID is 1234-567890, only 567890 is sent to Merchant Direct.

If the order ID has fewer than 3 characters, it may display a blank or 0000000000 in the Invoice Number field.
electronic commerce indicator

String

1-character alphanumeric

mcpResPreauthCC.setCryptType(crypt);

Describes the category of e-commerce transaction being processed. Allowable values are:


  • 1 - Mail Order / Telephone Order—Single
  • 2 - Mail Order / Telephone Order—Recurring
  • 3 - Mail Order / Telephone Order—Instalment
  • 4 - Mail Order / Telephone Order—Unknown classification
  • 5 - Authenticated e-commerce transaction (VBV)
  • 6 - Non-authenticated e-commerce transaction (VBV)
  • 7 - SSL-enabled merchant

In Credential on File transactions where the request field e-commerce indicator is also being sent: the allowable values for e-commerce indicator are dependent on the value sent for payment indicator, as follows:


if payment indicator = R, then allowable values for e-commerce indicator: 2, 5 or 6
if payment indicator = C, then allowable values for e-commerce indicator: 1, 5, 6 or 7
if payment indicator = U, then allowable values for e-commerce indicator: 1 or 7
if payment indicator = Z, then allowable values for e-commerce indicator: 1, 5, 6 or 7

MCP-specific request fields – Required

Variable Name Type and Limits Set Method Description
MCP version number

String

current version is 1.0

mcpResPreauthCC.setMCPVersion("MCP_VERSION_NUM"); Release version number for MCP
cardholder amount

String

12-character numeric

smallest discrete unit of foreign currency

mcpResPreauthCC.setCardholderAmount("CARDHOLDER_AMOUNT"); Amount, in units of foreign currency, the cardholder will be charged on the transaction
cardholder currency code

String

3-character numeric

mcpResPreauthCC.setCardholderCurrencyCode("CARDHOLDER_CURRENCY_CODE"); ISO code representing the foreign currency of the cardholder

MCP Purchase with Vault transaction request fields – Optional

Variable Name Type and Limits Set Method Description
customer ID

String

30-character alphanumeric

mcpResPreauthCC.setCustId(cust_id);

This can be used for policy number, membership number, student ID, invoice number and so on.

This field is searchable from the Moneris Merchant Resource Centre

dynamic descriptor

String

max 20-character alphanumeric

total of 22 characters including your merchant name and separator

mcpResPreauthCC.setDynamicDescriptor(dynamic_descriptor);

Merchant defined description sent on a per-transaction basis that will appear on the credit card statement. Dependent on the card Issuer, the statement will typically show the dynamic desciptor appended to the merchant's existing business name separated by the "/" character. Please note that the combined length of the merchant's business name, forward slash "/" character, and the dynamic descriptor may not exceed 22 characters.

-Example-

Existing Business Name: ABC Painting

Dynamic Descriptor: Booking 12345

Cardholder Statement Displays: ABC Painting/Booking 1

Credential on File Info cof

NOTE: This is a nested object within the transaction, and required when storing or using the customer's stored credentials. For information about fields in the Credential on FIle Info object, see Credential on File Info Object and Variables.

Object

N/A

mcpResPreauthCC.setCofInfo(cof); If you are doing a vault transaction (using a permanent token) the COF Info object is mandatory.
For Definitions of Request Fields of Credential on File please refer back to Purchase / Preauth with Credential on File section.
AVS Information

Object

N/A

mcpResPreauthCC.setAvsInfo(avsCheck); Contains fields applying to the Address Verification Service (AVS) e-fraud tool
CVD Information

Object

N/A

mcpResPreauthCC.setCvdInfo(cvdCheck); Contains fields related to the Card Validation Digits e-fraud tool

MCP-specific request fields – Optional

Variable Name Type and Limits Set Method Description
MCP rate token

String

N/A

mcpResPreauthCC.setMCPRateToken("MCP_RATE_TOKEN"); Token representing a temporarily locked-in foreign exchange rate, obtained in the response of the MCP Get Rate transaction and used in subsequent MCP financial transaction requests in order to redeem that rate